package com.myhouse.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.myhouse.biz.UserBiz;
import com.myhouse.dao.UserDao;
import com.myhouse.entity.User;

@Service("userBiz")
public class UserBizImpl implements UserBiz{

	@Autowired
	private UserDao userDao;
	
	public boolean register(User user) {
		return userDao.register(user);
	}

	public List<User> getAllUsers(int isInUse) {
		return userDao.getAllUsers(isInUse);
	}

	public User fetchByUsername(String username) {
		return userDao.fetchByUsername(username);
	}

	public User checkLogin(String username, String password, int isInUse) {
		return userDao.checkLogin(username, password, isInUse);
	}

	public boolean updateUserNoById(int id,int isInUse) {
		return userDao.updateUserNoById(id,isInUse);
	}

}
